SetThemeWindowBackground
NEW WITH THE APPEARANCE MANAGER
Sets the Appearance-compliant color or pattern that the window background will be repainted to whenPaintOne
is called.
pascal OSStatus SetThemeWindowBackground ( WindowPtr inWindow, ThemeBrush inBrush, Boolean inUpdate);
inWindow
- On input, a pointer to a window.
inBrush
- A value representing the pattern or color to which the window background will be set; see "Appearance-Compliant Brush Type Constants".
inUpdate
- A Boolean value. If
true
, the content region of the window is to be invalidated and the window erased. Iffalse
, the window background is to be set but no drawing will occur on screen.- function result
- A result code. The result code
appearanceBadBrushIndexErr
indicates that the brush constant passed was not valid. For a list of other result codes, see "Result Codes".DISCUSSION
TheSetThemeWindowBackground
function sets the color or pattern to which the Window Manager will erase the window background.The constant in the
inBrush
parameter can represent a color or pattern, depending on the current theme. Because it could specify a pattern, remember to save and restore thepnPixPat
andbkPixPat
fields of your graphics port when saving the text and background colors. Because patterns in thebkPixPat
field override the background color of the window, call the Window Manager functionBackPat
to set your background pattern to a normal white pattern. This will ensure that you can useRGBBackColor
to set your background color to white, call the Window Manager functionEraseRect
, and get the expected results.